package cn.wolfcode.qo;


import lombok.Getter;
import lombok.Setter;
import org.apache.shiro.SecurityUtils;
import org.springframework.util.StringUtils;

@Setter
@Getter
public class QueryObject {

    private String keyword;
    private int currentPage = 1;
    private int pageSize = 5;

    public String getKeyword(){

        if (StringUtils.hasText(keyword)){

            return keyword.trim().replaceAll(" ", "");
        }

        return null;
    }
    public int getStart(){

        return (currentPage - 1) * pageSize;


    }
}
